package com.artPreter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.artPreter.mapper.TemplateDetailMapper;
import com.artPreter.pojo.Depart;
import com.artPreter.pojo.DepartSectionTemp;
import com.artPreter.mapper.DepartSectionTempMapper;
import com.artPreter.pojo.TemplateDetail;
import com.artPreter.service.IDepartContentSectionService;
import com.artPreter.service.IDepartSectionTempService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 * 机构栏目表 服务实现类
 * </p>
 *
 * @author jarvis
 * @since 2024-11-19
 */
@Service
public class DepartSectionTempServiceImpl extends ServiceImpl<DepartSectionTempMapper, DepartSectionTemp> implements IDepartSectionTempService {


    @Override
    public List<DepartSectionTemp> getList(DepartSectionTemp departSectionTemp) {
        LambdaQueryWrapper<DepartSectionTemp> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        if(departSectionTemp.getDepartId()!=null){
            lambdaQueryWrapper.eq(DepartSectionTemp::getDepartId, departSectionTemp.getDepartId());
        }
        lambdaQueryWrapper.orderByAsc(DepartSectionTemp::getSort);
        List<DepartSectionTemp> list = this.baseMapper.selectList(lambdaQueryWrapper);
        return list;
    }
}
